<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <div th:replace="header::common"></div>

    <style>
        .center {
            width: 1000px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
<form class="center" action="/insure/update" method="post">
    <input type="hidden" name="id" th:value="${insure.id}"/>
    <div class="form-group">
        <label>保险名称</label>
        <input type="text" th:value="${insure.name}" class="form-control" name="name">
    </div>
    <div class="form-group">
        <label>保险所属</label>
        <select class="form-control" name="typeid">
            <th:block th:each="insureType:${list}" >
                <option th:selected="${insureType.id==insure.typeid}" th:value="${insureType.id}" th:text="${insureType.name}"></option>
            </th:block>
        </select>
    </div>
    <div class="form-group">
        <label>车牌</label>
        <input type="text" th:value="${insure.carid}" class="form-control" name="carid">
    </div>
    <div class="form-group">
        <label>投保时间</label>
        <input type="text" th:value="${insure.start}" class="form-control" name="start">
    </div>
    <div class="form-group">
        <label>年限</label>
        <input type="text" th:value="${insure.end}" class="form-control" name="end">
    </div>
    <div class="form-group">
        <label>保险金额</label>
        <input type="text" th:value="${insure.money}" class="form-control" name="money">
    </div>
    <input class="btn btn-primary" type="submit" value="修改">
</form>

<script type="text/javascript" th:src="@{/static/kindeditor/kindeditor.js}"></script>
<script>
    KindEditor.ready(function() {
        var kindEditorParams = {
            afterBlur: function() {
                this.sync();

            }
        };

        KindEditor.create('#content', kindEditorParams);
    });

</script>
</body>
</html>